import {
    ar as e,
    d as o,
    R as n,
    r as t,
    aH as l,
    as as r,
    aU as a,
    a as i,
    b6 as s,
    am as u,
    at as d,
    bF as c,
    K as p,
    cV as m,
    bU as f,
    w as v,
    b0 as g,
    F as b,
    o as w,
    h,
    i as y,
    k as I,
    ci as E,
    cj as _,
    P as C,
    an as k,
    S as T,
    aq as F,
    aR as S,
    aG as R,
    aw as x,
    ao as O,
    by as L,
    aN as B,
    c as D,
    Q as $,
    V as M,
    p as P,
    s as K,
    j as N,
    ap as G,
    bx as z,
    H as A,
    U as j,
    aJ as H,
    b8 as V,
    J,
    cv as U,
    b as Y,
    x as q,
    cW as W,
    cX as Q,
    cY as X,
    cZ as Z,
    c_ as ee,
    D as oe,
    cq as ne,
    ax as te,
    l as le,
    t as re
} from "./index.115af62d1729265196717.js";
import {F as ae, a as ie} from "./index.eec34c841729265196717.js";
import {_ as se} from "./_plugin-vue_export-helper.1b428a4d1729265196717.js";
import {d as ue, E as de, u as ce} from "./el-button.c1876bd01729265196717.js";
import {j as pe, k as me, b as fe, a as ve, O as ge, e as be, w as we} from "./el-divider.111259cd1729265196717.js";

var he = e(o({inheritAttrs: !1}), [["render", function (e, o, t, l, r, a) {
    return n(e.$slots, "default")
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);
var ye = e(o({name: "ElCollectionItem", inheritAttrs: !1}), [["render", function (e, o, t, l, r, a) {
    return n(e.$slots, "default")
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);
const Ie = "data-el-collection-item", Ee = e => {
    const o = `El${e}Collection`, n = `${o}Item`, u = Symbol(o), d = Symbol(n), c = {
        ...he, name: o, setup() {
            const e = t(null), o = new Map;
            l(u, {
                itemMap: o, getItems: () => {
                    const n = i(e);
                    if (!n) return [];
                    const t = Array.from(n.querySelectorAll(`[${Ie}]`));
                    return [...o.values()].sort(((e, o) => t.indexOf(e.ref) - t.indexOf(o.ref)))
                }, collectionRef: e
            })
        }
    }, p = {
        ...ye, name: n, setup(e, {attrs: o}) {
            const n = t(null), c = r(u, void 0);
            l(d, {collectionItemRef: n}), a((() => {
                const e = i(n);
                e && c.itemMap.set(e, {ref: e, ...o})
            })), s((() => {
                const e = i(n);
                c.itemMap.delete(e)
            }))
        }
    };
    return {COLLECTION_INJECTION_KEY: u, COLLECTION_ITEM_INJECTION_KEY: d, ElCollection: c, ElCollectionItem: p}
}, _e = u({
    style: {type: d([String, Array, Object])},
    currentTabId: {type: d(String)},
    defaultCurrentTabId: String,
    loop: Boolean,
    dir: {type: String, values: ["ltr", "rtl"], default: "ltr"},
    orientation: {type: d(String)},
    onBlur: Function,
    onFocus: Function,
    onMousedown: Function
}), {
    ElCollection: Ce,
    ElCollectionItem: ke,
    COLLECTION_INJECTION_KEY: Te,
    COLLECTION_ITEM_INJECTION_KEY: Fe
} = Ee("RovingFocusGroup"), Se = Symbol("elRovingFocusGroup"), Re = Symbol("elRovingFocusGroupItem"), xe = {
    ArrowLeft: "prev",
    ArrowUp: "prev",
    ArrowRight: "next",
    ArrowDown: "next",
    PageUp: "first",
    Home: "first",
    PageDown: "last",
    End: "last"
}, Oe = (e, o, n) => {
    const t = ((e, o) => {
        if ("rtl" !== o) return e;
        switch (e) {
            case c.right:
                return c.left;
            case c.left:
                return c.right;
            default:
                return e
        }
    })(e.key, n);
    if (!("vertical" === o && [c.left, c.right].includes(t) || "horizontal" === o && [c.up, c.down].includes(t))) return xe[t]
}, Le = e => {
    const {activeElement: o} = document;
    for (const n of e) {
        if (n === o) return;
        if (n.focus(), o !== document.activeElement) return
    }
}, Be = "currentTabIdChange", De = "rovingFocusGroup.entryFocus", $e = {bubbles: !1, cancelable: !0}, Me = o({
    name: "ElRovingFocusGroupImpl", inheritAttrs: !1, props: _e, emits: [Be, "entryFocus"], setup(e, {emit: o}) {
        var n;
        const a = t(null != (n = e.currentTabId || e.defaultCurrentTabId) ? n : null), s = t(!1), u = t(!1),
            d = t(null), {getItems: c} = r(Te, void 0), b = p((() => [{outline: "none"}, e.style])), w = pe((o => {
                var n;
                null == (n = e.onMousedown) || n.call(e, o)
            }), (() => {
                u.value = !0
            })), h = pe((o => {
                var n;
                null == (n = e.onFocus) || n.call(e, o)
            }), (e => {
                const o = !i(u), {target: n, currentTarget: t} = e;
                if (n === t && o && !i(s)) {
                    const e = new Event(De, $e);
                    if (null == t || t.dispatchEvent(e), !e.defaultPrevented) {
                        const e = c().filter((e => e.focusable)),
                            o = [e.find((e => e.active)), e.find((e => e.id === i(a))), ...e].filter(Boolean).map((e => e.ref));
                        Le(o)
                    }
                }
                u.value = !1
            })), y = pe((o => {
                var n;
                null == (n = e.onBlur) || n.call(e, o)
            }), (() => {
                s.value = !1
            }));
        l(Se, {
            currentTabbedId: m(a),
            loop: f(e, "loop"),
            tabIndex: p((() => i(s) ? -1 : 0)),
            rovingFocusGroupRef: d,
            rovingFocusGroupRootStyle: b,
            orientation: f(e, "orientation"),
            dir: f(e, "dir"),
            onItemFocus: e => {
                o(Be, e)
            },
            onItemShiftTab: () => {
                s.value = !0
            },
            onBlur: y,
            onFocus: h,
            onMousedown: w
        }), v((() => e.currentTabId), (e => {
            a.value = null != e ? e : null
        })), g(d, De, ((...e) => {
            o("entryFocus", ...e)
        }))
    }
});
var Pe = e(o({
    name: "ElRovingFocusGroup",
    components: {
        ElFocusGroupCollection: Ce, ElRovingFocusGroupImpl: e(Me, [["render", function (e, o, t, l, r, a) {
            return n(e.$slots, "default")
        }], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group-impl.vue"]])
    }
}), [["render", function (e, o, t, l, r, a) {
    const i = b("el-roving-focus-group-impl"), s = b("el-focus-group-collection");
    return w(), h(s, null, {
        default: y((() => [I(i, E(_(e.$attrs)), {
            default: y((() => [n(e.$slots, "default")])),
            _: 3
        }, 16)])), _: 3
    })
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group.vue"]]);
var Ke = e(o({
    components: {ElRovingFocusCollectionItem: ke},
    props: {focusable: {type: Boolean, default: !0}, active: {type: Boolean, default: !1}},
    emits: ["mousedown", "focus", "keydown"],
    setup(e, {emit: o}) {
        const {
            currentTabbedId: n,
            loop: a,
            onItemFocus: s,
            onItemShiftTab: u
        } = r(Se, void 0), {getItems: d} = r(Te, void 0), m = ue(), f = t(null), v = pe((e => {
            o("mousedown", e)
        }), (o => {
            e.focusable ? s(i(m)) : o.preventDefault()
        })), g = pe((e => {
            o("focus", e)
        }), (() => {
            s(i(m))
        })), b = pe((e => {
            o("keydown", e)
        }), (e => {
            const {key: o, shiftKey: n, target: t, currentTarget: l} = e;
            if (o === c.tab && n) return void u();
            if (t !== l) return;
            const r = Oe(e);
            if (r) {
                e.preventDefault();
                let o = d().filter((e => e.focusable)).map((e => e.ref));
                switch (r) {
                    case"last":
                        o.reverse();
                        break;
                    case"prev":
                    case"next": {
                        "prev" === r && o.reverse();
                        const e = o.indexOf(l);
                        o = a.value ? (s = e + 1, (i = o).map(((e, o) => i[(o + s) % i.length]))) : o.slice(e + 1);
                        break
                    }
                }
                C((() => {
                    Le(o)
                }))
            }
            var i, s
        })), w = p((() => n.value === i(m)));
        return l(Re, {
            rovingFocusGroupItemRef: f,
            tabIndex: p((() => i(w) ? 0 : -1)),
            handleMousedown: v,
            handleFocus: g,
            handleKeydown: b
        }), {id: m, handleKeydown: b, handleFocus: g, handleMousedown: v}
    }
}), [["render", function (e, o, t, l, r, a) {
    const i = b("el-roving-focus-collection-item");
    return w(), h(i, {
        id: e.id,
        focusable: e.focusable,
        active: e.active
    }, {default: y((() => [n(e.$slots, "default")])), _: 3}, 8, ["id", "focusable", "active"])
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-item.vue"]]);
const Ne = u({
        trigger: me.trigger,
        effect: {...fe.effect, default: "light"},
        type: {type: d(String)},
        placement: {type: d(String), default: "bottom"},
        popperOptions: {type: d(Object), default: () => ({})},
        id: String,
        size: {type: String, default: ""},
        splitButton: Boolean,
        hideOnClick: {type: Boolean, default: !0},
        loop: {type: Boolean, default: !0},
        showTimeout: {type: Number, default: 150},
        hideTimeout: {type: Number, default: 150},
        tabindex: {type: d([Number, String]), default: 0},
        maxHeight: {type: d([Number, String]), default: ""},
        popperClass: {type: String, default: ""},
        disabled: {type: Boolean, default: !1},
        role: {type: String, default: "menu"},
        buttonProps: {type: d(Object)},
        teleported: fe.teleported
    }), Ge = u({
        command: {type: [Object, String, Number], default: () => ({})},
        disabled: Boolean,
        divided: Boolean,
        textValue: String,
        icon: {type: k}
    }), ze = u({onKeydown: {type: d(Function)}}), Ae = [c.down, c.pageDown, c.home], je = [c.up, c.pageUp, c.end],
    He = [...Ae, ...je], {
        ElCollection: Ve,
        ElCollectionItem: Je,
        COLLECTION_INJECTION_KEY: Ue,
        COLLECTION_ITEM_INJECTION_KEY: Ye
    } = Ee("Dropdown"), qe = Symbol("elDropdown"), {ButtonGroup: We} = de;
var Qe = e(o({
    name: "ElDropdown",
    components: {
        ElButton: de,
        ElButtonGroup: We,
        ElScrollbar: T,
        ElDropdownCollection: Ve,
        ElTooltip: ve,
        ElRovingFocusGroup: Pe,
        ElOnlyChild: ge,
        ElIcon: F,
        ArrowDown: S
    },
    props: Ne,
    emits: ["visible-change", "click", "command"],
    setup(e, {emit: o}) {
        const n = R(), r = x("dropdown"), {t: a} = O(), u = t(), d = t(), m = t(null), g = t(null), b = t(null),
            w = t(null), h = t(!1), y = [c.enter, c.space, c.down], I = p((() => ({maxHeight: L(e.maxHeight)}))),
            E = p((() => [r.m(T.value)])), _ = ue().value, C = p((() => e.id || _));

        function k() {
            var e;
            null == (e = m.value) || e.onClose()
        }

        v([u, f(e, "trigger")], (([e, o], [n]) => {
            var t, l, r;
            const a = B(o) ? o : [o];
            (null == (t = null == n ? void 0 : n.$el) ? void 0 : t.removeEventListener) && n.$el.removeEventListener("pointerenter", F), (null == (l = null == e ? void 0 : e.$el) ? void 0 : l.removeEventListener) && e.$el.removeEventListener("pointerenter", F), (null == (r = null == e ? void 0 : e.$el) ? void 0 : r.addEventListener) && a.includes("hover") && e.$el.addEventListener("pointerenter", F)
        }), {immediate: !0}), s((() => {
            var e, o;
            (null == (o = null == (e = u.value) ? void 0 : e.$el) ? void 0 : o.removeEventListener) && u.value.$el.removeEventListener("pointerenter", F)
        }));
        const T = ce();

        function F() {
            var e, o;
            null == (o = null == (e = u.value) ? void 0 : e.$el) || o.focus()
        }

        l(qe, {
            contentRef: g, role: p((() => e.role)), triggerId: C, isUsingKeyboard: h, onItemEnter: function () {
            }, onItemLeave: function () {
                const e = i(g);
                null == e || e.focus(), w.value = null
            }
        }), l("elDropdown", {
            instance: n, dropdownSize: T, handleClick: function () {
                k()
            }, commandHandler: function (...e) {
                o("command", ...e)
            }, trigger: f(e, "trigger"), hideOnClick: f(e, "hideOnClick")
        });
        return {
            t: a,
            ns: r,
            scrollbar: b,
            wrapStyle: I,
            dropdownTriggerKls: E,
            dropdownSize: T,
            triggerId: C,
            triggerKeys: y,
            currentTabId: w,
            handleCurrentTabIdChange: function (e) {
                w.value = e
            },
            handlerMainButtonClick: e => {
                o("click", e)
            },
            handleEntryFocus: function (e) {
                h.value || (e.preventDefault(), e.stopImmediatePropagation())
            },
            handleClose: k,
            handleOpen: function () {
                var e;
                null == (e = m.value) || e.onOpen()
            },
            handleBeforeShowTooltip: function () {
                o("visible-change", !0)
            },
            handleShowTooltip: function (e) {
                "keydown" === (null == e ? void 0 : e.type) && g.value.focus()
            },
            handleBeforeHideTooltip: function () {
                o("visible-change", !1)
            },
            onFocusAfterTrapped: e => {
                var o, n;
                e.preventDefault(), null == (n = null == (o = g.value) ? void 0 : o.focus) || n.call(o, {preventScroll: !0})
            },
            popperRef: m,
            contentRef: g,
            triggeringElementRef: u,
            referenceElementRef: d
        }
    }
}), [["render", function (e, o, t, l, r, a) {
    var i;
    const s = b("el-dropdown-collection"), u = b("el-roving-focus-group"), d = b("el-scrollbar"),
        c = b("el-only-child"), p = b("el-tooltip"), m = b("el-button"), f = b("arrow-down"), v = b("el-icon"),
        g = b("el-button-group");
    return w(), D("div", {class: P([e.ns.b(), e.ns.is("disabled", e.disabled)])}, [I(p, {
        ref: "popperRef",
        role: e.role,
        effect: e.effect,
        "fallback-placements": ["bottom", "top"],
        "popper-options": e.popperOptions,
        "gpu-acceleration": !1,
        "hide-after": "hover" === e.trigger ? e.hideTimeout : 0,
        "manual-mode": !0,
        placement: e.placement,
        "popper-class": [e.ns.e("popper"), e.popperClass],
        "reference-element": null == (i = e.referenceElementRef) ? void 0 : i.$el,
        trigger: e.trigger,
        "trigger-keys": e.triggerKeys,
        "trigger-target-el": e.contentRef,
        "show-after": "hover" === e.trigger ? e.showTimeout : 0,
        "stop-popper-mouse-event": !1,
        "virtual-ref": e.triggeringElementRef,
        "virtual-triggering": e.splitButton,
        disabled: e.disabled,
        transition: `${e.ns.namespace.value}-zoom-in-top`,
        teleported: e.teleported,
        pure: "",
        persistent: "",
        onBeforeShow: e.handleBeforeShowTooltip,
        onShow: e.handleShowTooltip,
        onBeforeHide: e.handleBeforeHideTooltip
    }, $({
        content: y((() => [I(d, {
            ref: "scrollbar",
            "wrap-style": e.wrapStyle,
            tag: "div",
            "view-class": e.ns.e("list")
        }, {
            default: y((() => [I(u, {
                loop: e.loop,
                "current-tab-id": e.currentTabId,
                orientation: "horizontal",
                onCurrentTabIdChange: e.handleCurrentTabIdChange,
                onEntryFocus: e.handleEntryFocus
            }, {
                default: y((() => [I(s, null, {default: y((() => [n(e.$slots, "dropdown")])), _: 3})])),
                _: 3
            }, 8, ["loop", "current-tab-id", "onCurrentTabIdChange", "onEntryFocus"])])), _: 3
        }, 8, ["wrap-style", "view-class"])])), _: 2
    }, [e.splitButton ? void 0 : {
        name: "default",
        fn: y((() => [I(c, {
            id: e.triggerId,
            ref: "triggeringElementRef",
            role: "button",
            tabindex: e.tabindex
        }, {default: y((() => [n(e.$slots, "default")])), _: 3}, 8, ["id", "tabindex"])]))
    }]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "onBeforeShow", "onShow", "onBeforeHide"]), e.splitButton ? (w(), h(g, {key: 0}, {
        default: y((() => [I(m, M({ref: "referenceElementRef"}, e.buttonProps, {
            size: e.dropdownSize,
            type: e.type,
            disabled: e.disabled,
            tabindex: e.tabindex,
            onClick: e.handlerMainButtonClick
        }), {
            default: y((() => [n(e.$slots, "default")])),
            _: 3
        }, 16, ["size", "type", "disabled", "tabindex", "onClick"]), I(m, M({
            id: e.triggerId,
            ref: "triggeringElementRef"
        }, e.buttonProps, {
            role: "button",
            size: e.dropdownSize,
            type: e.type,
            class: e.ns.e("caret-button"),
            disabled: e.disabled,
            tabindex: e.tabindex,
            "aria-label": e.t("el.dropdown.toggleDropdown")
        }), {
            default: y((() => [I(v, {class: P(e.ns.e("icon"))}, {default: y((() => [I(f)])), _: 1}, 8, ["class"])])),
            _: 1
        }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"])])), _: 3
    })) : K("v-if", !0)], 2)
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown.vue"]]);
const Xe = o({
    name: "DropdownItemImpl",
    components: {ElIcon: F},
    props: Ge,
    emits: ["pointermove", "pointerleave", "click", "clickimpl"],
    setup(e, {emit: o}) {
        const n = x("dropdown"), {role: t} = r(qe, void 0), {collectionItemRef: l} = r(Ye, void 0), {collectionItemRef: a} = r(Fe, void 0), {
                rovingFocusGroupItemRef: i,
                tabIndex: s,
                handleFocus: u,
                handleKeydown: d,
                handleMousedown: m
            } = r(Re, void 0), f = be(l, a, i),
            v = p((() => "menu" === t.value ? "menuitem" : "navigation" === t.value ? "link" : "button")),
            g = pe((e => {
                const {code: n} = e;
                if (n === c.enter || n === c.space) return e.preventDefault(), e.stopImmediatePropagation(), o("clickimpl", e), !0
            }), d);
        return {
            ns: n,
            itemRef: f,
            dataset: {[Ie]: ""},
            role: v,
            tabIndex: s,
            handleFocus: u,
            handleKeydown: g,
            handleMousedown: m
        }
    }
}), Ze = ["aria-disabled", "tabindex", "role"];
const eo = () => {
    const e = r("elDropdown", {}), o = p((() => null == e ? void 0 : e.dropdownSize));
    return {elDropdown: e, _elDropdownSize: o}
};
var oo = e(o({
    name: "ElDropdownItem", components: {
        ElDropdownCollectionItem: Je,
        ElRovingFocusItem: Ke,
        ElDropdownItemImpl: e(Xe, [["render", function (e, o, t, l, r, a) {
            const i = b("el-icon");
            return w(), D(A, null, [e.divided ? (w(), D("li", M({
                key: 0,
                role: "separator",
                class: e.ns.bem("menu", "item", "divided")
            }, e.$attrs), null, 16)) : K("v-if", !0), N("li", M({ref: e.itemRef}, {...e.dataset, ...e.$attrs}, {
                "aria-disabled": e.disabled,
                class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)],
                tabindex: e.tabIndex,
                role: e.role,
                onClick: o[0] || (o[0] = o => e.$emit("clickimpl", o)),
                onFocus: o[1] || (o[1] = (...o) => e.handleFocus && e.handleFocus(...o)),
                onKeydown: o[2] || (o[2] = z(((...o) => e.handleKeydown && e.handleKeydown(...o)), ["self"])),
                onMousedown: o[3] || (o[3] = (...o) => e.handleMousedown && e.handleMousedown(...o)),
                onPointermove: o[4] || (o[4] = o => e.$emit("pointermove", o)),
                onPointerleave: o[5] || (o[5] = o => e.$emit("pointerleave", o))
            }), [e.icon ? (w(), h(i, {key: 0}, {
                default: y((() => [(w(), h(G(e.icon)))])),
                _: 1
            })) : K("v-if", !0), n(e.$slots, "default")], 16, Ze)], 64)
        }], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item-impl.vue"]])
    }, inheritAttrs: !1, props: Ge, emits: ["pointermove", "pointerleave", "click"], setup(e, {emit: o, attrs: n}) {
        const {elDropdown: l} = eo(), a = R(), s = t(null), u = p((() => {
                var e, o;
                return null != (o = null == (e = i(s)) ? void 0 : e.textContent) ? o : ""
            })), {onItemEnter: d, onItemLeave: c} = r(qe, void 0),
            m = pe((e => (o("pointermove", e), e.defaultPrevented)), we((o => {
                if (e.disabled) return void c(o);
                const n = o.currentTarget;
                n === document.activeElement || n.contains(document.activeElement) || (d(o), o.defaultPrevented || null == n || n.focus())
            }))), f = pe((e => (o("pointerleave", e), e.defaultPrevented)), we((e => {
                c(e)
            })));
        return {
            handleClick: pe((n => {
                if (!e.disabled) return o("click", n), "keydown" !== n.type && n.defaultPrevented
            }), (o => {
                var n, t, r;
                e.disabled ? o.stopImmediatePropagation() : ((null == (n = null == l ? void 0 : l.hideOnClick) ? void 0 : n.value) && (null == (t = l.handleClick) || t.call(l)), null == (r = l.commandHandler) || r.call(l, e.command, a, o))
            })), handlePointerMove: m, handlePointerLeave: f, textContent: u, propsAndAttrs: p((() => ({...e, ...n})))
        }
    }
}), [["render", function (e, o, t, l, r, a) {
    var i;
    const s = b("el-dropdown-item-impl"), u = b("el-roving-focus-item"), d = b("el-dropdown-collection-item");
    return w(), h(d, {
        disabled: e.disabled,
        "text-value": null != (i = e.textValue) ? i : e.textContent
    }, {
        default: y((() => [I(u, {focusable: !e.disabled}, {
            default: y((() => [I(s, M(e.propsAndAttrs, {
                onPointerleave: e.handlePointerLeave,
                onPointermove: e.handlePointerMove,
                onClickimpl: e.handleClick
            }), {
                default: y((() => [n(e.$slots, "default")])),
                _: 3
            }, 16, ["onPointerleave", "onPointermove", "onClickimpl"])])), _: 3
        }, 8, ["focusable"])])), _: 3
    }, 8, ["disabled", "text-value"])
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item.vue"]]);
const no = o({
    name: "ElDropdownMenu", props: ze, setup(e) {
        const o = x("dropdown"), {_elDropdownSize: n} = eo(), t = n.value, {
                focusTrapRef: l,
                onKeydown: a
            } = r(ae, void 0), {contentRef: s, role: u, triggerId: d} = r(qe, void 0), {
                collectionRef: m,
                getItems: f
            } = r(Ue, void 0), {
                rovingFocusGroupRef: v,
                rovingFocusGroupRootStyle: g,
                tabIndex: b,
                onBlur: w,
                onFocus: h,
                onMousedown: y
            } = r(Se, void 0), {collectionRef: I} = r(Te, void 0),
            E = p((() => [o.b("menu"), o.bm("menu", null == t ? void 0 : t.value)])), _ = be(s, m, l, v, I),
            C = pe((o => {
                var n;
                null == (n = e.onKeydown) || n.call(e, o)
            }), (e => {
                const {currentTarget: o, code: n, target: t} = e;
                if (o.contains(t), c.tab === n && e.stopImmediatePropagation(), e.preventDefault(), t !== i(s)) return;
                if (!He.includes(n)) return;
                const l = f().filter((e => !e.disabled)).map((e => e.ref));
                je.includes(n) && l.reverse(), Le(l)
            }));
        return {
            size: t,
            rovingFocusGroupRootStyle: g,
            tabIndex: b,
            dropdownKls: E,
            role: u,
            triggerId: d,
            dropdownListWrapperRef: _,
            handleKeydown: e => {
                C(e), a(e)
            },
            onBlur: w,
            onFocus: h,
            onMousedown: y
        }
    }
}), to = ["role", "aria-labelledby"];
var lo = e(no, [["render", function (e, o, t, l, r, a) {
    return w(), D("ul", {
        ref: e.dropdownListWrapperRef,
        class: P(e.dropdownKls),
        style: j(e.rovingFocusGroupRootStyle),
        tabindex: -1,
        role: e.role,
        "aria-labelledby": e.triggerId,
        onBlur: o[0] || (o[0] = (...o) => e.onBlur && e.onBlur(...o)),
        onFocus: o[1] || (o[1] = (...o) => e.onFocus && e.onFocus(...o)),
        onKeydown: o[2] || (o[2] = z(((...o) => e.handleKeydown && e.handleKeydown(...o)), ["self"])),
        onMousedown: o[3] || (o[3] = z(((...o) => e.onMousedown && e.onMousedown(...o)), ["self"]))
    }, [n(e.$slots, "default")], 46, to)
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-menu.vue"]]);
const ro = H(Qe, {DropdownItem: oo, DropdownMenu: lo}), ao = V(oo), io = V(lo), so = e => J(U, e),
    uo = "/assets/png/logo.841bfdd21729265196717.png", co = se(o({
        __name: "ThemeSwitch", setup(e) {
            const {getPrefixCls: o} = q(), n = o("theme-switch"), l = so({icon: "emojione-monotone:sun", color: "#fde047"}),
                r = so({icon: "emojione-monotone:crescent-moon", color: "#fde047"}), a = Y(), s = t(a.getIsDark),
                u = "var(--el-color-black)", d = e => {
                    a.setIsDark(e)
                };
            return (e, o) => (w(), h(i(ie), {
                class: P(i(n)),
                modelValue: s.value,
                "onUpdate:modelValue": o[0] || (o[0] = e => s.value = e),
                "inline-prompt": "",
                "border-color": u,
                "inactive-color": u,
                "active-color": u,
                "active-icon": i(l),
                "inactive-icon": i(r),
                onChange: d
            }, null, 8, ["class", "modelValue", "active-icon", "inactive-icon"]))
        }
    }), [["__scopeId", "data-v-e70fc6a8"]]), po = () => ({
        changeLocale: async e => {
            const o = W.global, n = await Q(Object.assign({
                "../../locales/en.ts": () => X((() => import("./en.15e067831729265196717.js")), []),
                "../../locales/zh-CN.ts": () => X((() => import("./zh-CN.77714c601729265196717.js")), [])
            }), `../../locales/${e}.ts`);
            o.setLocaleMessage(e, n.default), (e => {
                const o = Z();
                "legacy" === W.mode ? W.global.locale = e : W.global.locale.value = e, o.setCurrentLocale({lang: e}), ee(e)
            })(e)
        }
    }), mo = o({
        __name: "LocaleDropdown", props: {color: oe.string.def("")}, setup(e) {
            const {getPrefixCls: o} = q(), n = o("locale-dropdown"), t = ne(), l = p((() => t.getLocaleMap)),
                r = p((() => t.getCurrentLocale)), a = e => {
                    if (e === i(r).lang) return;
                    window.location.reload(), t.setCurrentLocale({lang: e});
                    const {changeLocale: o} = po();
                    o(e)
                };
            return (o, t) => {
                const r = b("Icon");
                return w(), h(i(ro), {
                    class: P(i(n)),
                    trigger: "click",
                    onCommand: a
                }, {
                    dropdown: y((() => [I(i(io), null, {
                        default: y((() => [(w(!0), D(A, null, te(i(l), (e => (w(), h(i(ao), {
                            key: e.lang,
                            command: e.lang
                        }, {default: y((() => [le(re(e.name), 1)])), _: 2}, 1032, ["command"])))), 128))])), _: 1
                    })])),
                    default: y((() => [I(r, {
                        size: 18,
                        icon: "ion:language-sharp",
                        class: P(["cursor-pointer", o.$attrs.class]),
                        color: e.color
                    }, null, 8, ["class", "color"])])),
                    _: 1
                }, 8, ["class"])
            }
        }
    });
export {io as E, co as T, mo as _, uo as a, ao as b, ro as c};
